<%= javascript_include_tag "jquery.validate" %>
<script type="text/javascript">
  $(document).ready(function(){
    $("#question").validate();
  });
</script>
<style type="text/css">
  .error {
    color:red;
    float:left;
  };
</style>
<div class="container">
  <p style="color:green;"><%= flash[:question_ss] if flash[:question_ss]  %></p>
  <p style="color:green;"><%= flash[:question_err] if flash[:question_err]  %></p>
  <fieldset>
    <div class="boxy">
      <div class="long ">
        <a class="head">My Question</a>
        <div class="forms ">
          <div class="clear c25">&nbsp;</div>
          <% form_tag questions_path ,:id =>"question" do %>
            <p><%= label_tag "message" %></p>
            <%= text_field_tag :message,"",:class=>"required" %>
            <%= select("category", "id", Category.all.collect {|p| [ p.title, p.id ] }, {:prompt => 'Select Category'},{:id =>"category",:name =>"category",:class =>"required"}) %><br>
            <%= submit_tag "OK" %>
          <%end%>
        </div>
      </div>
    </div>
  </fieldset>
</div>